<?php

namespace Admin\Controller;

class ConfigController extends __Controller {

    protected $form = array(
        'name' => array(
            'title' => '配置标识',
            'remark' => '不可重复',
            'type' => 'text',
            'name' => 'name'
        ),
        'remark' => array(
            'title' => '配置说明',
            'type' => 'text',
            'name' => 'remark'
        ),
        'type' => array(
            'title' => '数据类型',
            'type' => 'select',
            'name' => 'type',
            'options' => array(
                '0' => '数字',
                '1' => '字符',
                '2' => '文本',
                '3' => '数组' // 不允许修改
            )
        ),
        'value' => array(
            'title' => '数据内容',
            'type' => 'textarea',
            'name' => 'value'
        )
    );

    public function index(){
        $this->title = $this->meta_title = '系统设置';
        $this->description = '使用{:C(\'配置项\')}即可读取这里配置的内容';
        parent::index();
    }

    public function add()
    {
        parent::add(); // TODO: Change the autogenerated stub
    }

    public function edit($id)
    {
        parent::edit($id); // TODO: Change the autogenerated stub
    }

    public function delete($id)
    {
        parent::delete($id); // TODO: Change the autogenerated stub
    }

    public function sort($id, $value)
    {
        parent::sort($id, $value); // TODO: Change the autogenerated stub
    }
}